<template>
  <master :title="title">
    <listpage ref="listpage"></listpage>
  </master>
</template>
<script type="text/javascript">
(function (G) {
var _this = null;
G.vue({
  "usingComponents": {///引入组件
    "master": "/components/Master/Master",///母版组件
    "listpage": "/components/List/Page/Page"
  },
  "enablePullDownRefresh": true
},G.modelList({///配置listpage组件
  	modelName:'f_flow',///entity名称
    title:'应急预案',
    listPage(list,query){///query为前一个页面传过来的参数
      list.getUrl = '/api/model/f_flow?type=yjya'
      list.searchKey = 'name'
      list.models.expand1.label = '通知内容'
      list.models.expand2 = {
        label:'预案内容',
        unList:true,
        type:'file'
      }
      list.actions.push = {///定义操作按钮，默认存在修改和删除
        name:'处理流程',///按钮名称
        action(event){///点击回调
          let item = event.detail///数据
          G.$go(`/pages/flow/svg?flowId=${item.id}`)
        }
      }
    },
    modeleditquery(edit,event,query){///编辑页面 edit对象，event事件，query前一个页面传过来的参数
      edit.models.type = null
      edit.values.type = query.type
      edit.values.notify_url = '/v1/yjya'
      edit.models.notify_url = null
      edit.models.expand1.label = '通知内容'
      edit.models.expand1.style = 'width:100%;'
      edit.models.description.rule = { NotNull:true }
      edit.models.expand2 = {
        label:'预案内容',
        unList:true,
        type:'file'
      }
    }
  }));
})(Y)
</script>
<style scoped>
  
</style>